package com.study.nacos.consumer;

import com.study.nacos.consumer.client.ProvicerClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author MI
 * @version 1.0
 * @date 2020/10/17 21:06
 */
@RestController
public class ConsumerController {

    //动态代理对象，内部远程调用服务生产者
    @Autowired
    private ProvicerClient provicerClient;

    @GetMapping("/service")
    public String service() {

        return "cosumer " + provicerClient.service();
    }

}
